<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <link type="text/css" rel="stylesheet" href="./css/manage/style.css">
    <script type="text/javascript" src="<%=basePath%>/script/jquery-1.6.2.min.js"></script>
    <script type="text/javascript" src="<%=basePath%>/script/extend.js"></script>
  </head>
  
  <body>
    <div class="post">
		<div class="entry">
			<s:form action="./cas/items_index.action" method="post">
			<table width="100%" class="tab_comm mb20">
				<tbody>
					<tr>						 
						<td width="15%" class="tr fb blue_s">题库:</td>
						<td width="35%"><s:textfield name="type.name" cssClass="name_text"/></td>
						<td width="15%" class="tr fb blue_s">题型:</td>
						<td width="35%">
							<s:textfield name="type.name" cssClass="name_text"/>
						</td>
					</tr>
					<tr>
						<td width="15%" class="tr fb blue_s"></td>
						<td width="35%"></td>
						<td width="15%" class="tr fb blue_s"></td>
						<td width="35%">
							<span class="btnC"><s:submit value="查询" cssClass="btnC_text"/></span>
						</td>
					</tr>
				</tbody>
			</table>
			</s:form>
			<table width="100%" class="tab_comm tab_list">
				<thead>
					<th>序号</th>
					<th>题库</th>
					<th>内容</th>
					<th>编号</th>
					<th>分值</th>
					<th>题型</th>
					<th>状态</th>
					<th>操作</th>
				</thead>
				<tbody>
						<s:set name="codeing" value="1"/>
							<s:iterator value="#request.listitems" status="index">
						<tr>
							
							<td><s:property value="#codeing"/></td>
							<s:set name="codeing" value="#codeing+1"/>
							<td>
								题库
							</td>
							<td>
								<s:property value="content"/>
							</td>
							<td>
								<s:property value="itemcode"/>
							</td>
							<td>
								<s:property value="score"/>
							</td>
							<td>
								<s:property value="typeId"/>
							</td>
							<td>
								<s:if test="status==1">启用</s:if>
								<s:if test="status==0">停用</s:if>
							<td>
								<a href="./cas/types_edit.action?id=${id }">编辑</a>
								<a href="./cas/types_delete.action?id=${id }">删除</a>
							</td>
						</tr>
					</s:iterator>
				</tbody>
			</table>
			<table width="100%"><tr>
			<td >共${total}条记录</td>
			<td align="right">
			<pg:pager scope="request" maxIndexPages="10" index="center" maxPageItems="20" url="./cas/items_index.action" items="${total}" export="currentPageNumber=pageNumber">
				<jsp:include page="/WEB-INF/html/util/pager_plus.jsp"></jsp:include>
	    	</pg:pager>
			</td>
			</tr>
			<tr>
				<td colspan="2">
					<span class="btnS">
						<s:form action="./cas/items_addfirst.action" method="post">
							<input type="submit" value="创建题目"  class="btnS_text"/>
						</s:form>
					</span>
				</td>
			</tr>
			</table>
		</div>
	</div>
  </body>
</html>
